<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>删除节点的某个属性</title>

</head>
<body>

<div id="container" >

    <div id="other" style="background-color: red ;" name="qqqqqqqq" class="" title="">
        内容
    </div>
</div>
<button type="button" onclick="removeAttr()">点击我，进行移除属性</button>
<script type="text/javascript">
    function removeAttr() {
        // 1、获取属性
        let div = document.querySelector("#other") ;
        // 2、 删除
        console.log( div ) ;
        div.attributes.removeNamedItem("name") ;
        div.removeAttribute("style") ;
        console.log( div ) ;
    }
</script>
</body>
</html>